const user = {
    state: {
        user: {
            avatar:'',
            name:'',
            phone:'',
            id:''
        },
        token:null
    },
    actions: {
        setToken({commit},token) {
            commit('setToken',token)
        },
        updateUser({commit},user){
            commit('updateUser',user)
			
        }
    },
    mutations: {
        updateUser(state,user){
            state.user = Object.assign(state.user,user)
        },
        setToken(state, token) {
            state.token = token
        }
    }
}
export default user